﻿using EntityPWS;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using static EntityPWS.Employee;

namespace PartyWorkSupervise.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class InterviewController : ControllerBase
    {
        private readonly ApiDbContext apiDb;
        public InterviewController(ApiDbContext db)
        {
            apiDb = db;
        }

        [HttpGet("GetA")]
        public List<Interview> GetA()
        {
            return apiDb.interviews.ToList();
        }

        [HttpGet("Gete")]
        public List<Employee> Gete([FromBody] Guid id)
        {
            return apiDb.employees.Where(w => w.Id == id).ToList();
        }

        [HttpGet("Getp")]
        public List<People> Getp([FromBody] Guid id)
        {
            return apiDb.peoples.Where(w => w.Id == id).ToList();
        }
    }
}
